package com.crm.controller;

import com.crm.base.BaseController;
import com.crm.domain.entity.OrderDetail;
import com.crm.result.Result;
import com.crm.service.OrderDetailService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

/**
 * 订单详情控制器
 */

@RestController
@RequestMapping("/order-detail")
public class OrderDetailController extends BaseController<OrderDetailService, OrderDetail> {

    // 贡献查询
    @RequestMapping("/contribution")
    public Result<List<Map<String, Object>>> contribution(String name, Integer priceMin, Integer price, String date) {
        return Result.success(baseService.findByCustomer(name, priceMin, price, date));
    }
}
